#!/usr/local/bin/bash

GROUPDIR=$HOME/.dsh/group
DESKTOP_LIST=$GROUPDIR/desktops
BLADE_LIST=$GROUPDIR/blades
ALL_LIST=$GROUPDIR/all

echo "Producing list of desktops."
$HOME/bin/list_desktops.sh > $DESKTOP_LIST
echo "Producing list of blades."
$HOME/bin/list_blades.sh > $BLADE_LIST
echo "Producing the all list."
cat $DESKTOP_LIST $BLADE_LIST > $ALL_LIST

for n in 25 50 100; do
    echo "Producing list for ${n}desktops."
    head -n $n $DESKTOP_LIST > $HOME/.dsh/group/${n}desktops
done
